﻿#region License
// (c) Intergen.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
#endregion

using System;

namespace TextGlow.Control.Utilities
{
  public class MeasurementUtils
  {
    public const int DeviceIndependantDpi = 96;

    public static double ToPoints(double pixels)
    {
      return (pixels / DeviceIndependantDpi) * 72;
    }

    public static double ToPixels(double points)
    {
      return (points / 72) * DeviceIndependantDpi;
    }
  }
}